﻿using UnityEngine;
using XNode;

public class TeleportPointNode : MyXNode
{
    [Input(backingValue = ShowBackingValue.Always)]
    public TeleportPointNode destination;
    [Output]
    public TeleportPointNode self;

    public override object Output(NodePort port)
    {
        if (port.fieldName == nameof(self))
            return this;
        return base.Output(port);
    }

    public void GetDestination(out string scene, out string teleport)
    {
        string[] ret = destination.name.Split('_');
        scene = ret[0];
        teleport = ret[1];
    }
}